﻿using System;
using System.Collections.Generic;
using System.Text;
using Nebular.ExpenseManagement.Model;

namespace Nebular.ExpenseManagement.Services
{
    public class BatchControllerService : IBatchController
    {

        #region IBatchController Members

        public IBatchJob[] BatchJobList
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

       
        /// <summary>
        /// Queues up a job in the database for "As soon As possible" execution.
        /// </summary>
        /// <param name="jobName"></param>
        /// <returns></returns>
        public bool RunJob(string jobName)
        {
            throw new NotImplementedException();
        }

        #endregion


        #region IBatchController Members


        public void RunJobs()
        {
            System.Diagnostics.Debug.WriteLine("RunJobCalled");
            //var jobId;
            //while (jobId = Queue.Dequeue() != null)
            //{
            //    var fact = Container["jobfactory"];
            //    fact.CreateAsync(jobId);
            //}            
        }

        #endregion
    }
}
